package com.hyzx.qbasic.admin.domain.dao;

import com.hyzx.qbasic.admin.model.po.RolePO;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * Created by 黄江华 on 2017/9/29
 */

public interface RoleMapper {
    Set<String> getUserRoleNameList(@Param("userId") int userId);

    List<RolePO> getAllRoleList();

    List<RolePO> getPagedRoleList(@Param("roleName") String roleName);

    int addRole(RolePO role);

    int addRoleResources(@Param("roleId") int roleId, @Param("resourceList") List<Integer> resourceList);

    int deleteRole(List<Integer> roleIdList);

    int deleteRoleResources(List<Integer> roleIdList);

    int deleteRoleUsers(List<Integer> roleIdList);

    int editRole(RolePO role);

    List<Integer> getRoleResources(@Param("roleId") int roleId);

    RolePO getRoleInfo(@Param("roleId") int roleId);
}
